package com.mojo.kafka.controller;

import com.mojo.kafka.bean.Person;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.web.bind.annotation.RestController;

/**
 * rocket 消费者
 *
 * @author <a href="mailto:mojo_jj@163.com">Mojo</a>
 */
@RestController
@RocketMQMessageListener(topic = "rocket-topic", consumerGroup = "rocket-consumer-group")
public class RocketConsumerController implements RocketMQListener<Person> {


    @Override
    public void onMessage(Person person) {
        System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>" + person);
    }
}
